package com.example.imtoken.room.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import com.example.imtoken.room.schema.WalletCheckedSchema

@Dao
interface WalletCheckedDao {

    @Insert
    fun insertWalletChecked(walletCheckedSchema: WalletCheckedSchema): Long

    @Query("SELECT * FROM wallet_checked WHERE address = :address")
    fun getCheckedWallet(address: String?): WalletCheckedSchema?

    @Query("SELECT * FROM wallet_checked")
    fun getAllCheckedWallet(): MutableList<WalletCheckedSchema>?

    @Query("DELETE FROM wallet_checked")
    fun delete(): Int

    @Query("DELETE FROM wallet_checked WHERE address = :address")
    fun deleteAddress(address: String?): Int

}